<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">

<head>
    <title>广告列表</title>
    <meta charset="utf-8" />
    <meta name="renderer" content="webkit|ie-comp|ie-stand" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" type="text/css" th:href="@{/h-ui/static/h-ui/css/H-ui.min.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/h-ui/static/h-ui.admin/css/H-ui.admin.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/h-ui/lib/Hui-iconfont/1.0.8/iconfont.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/h-ui/extend/iconfont/iconfont.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/h-ui/static/h-ui.admin/skin/default/skin.css}" id="skin" />
    <link rel="stylesheet" type="text/css" th:href="@{/h-ui/static/h-ui.admin/css/style.css}" />
    <link th:href="@{/h-ui/lib/lightbox2/2.8.1/css/lightbox.css}" rel="stylesheet" type="text/css">
    <link rel="stylesheet" type="text/css" th:href="@{/h-ui/lib/select2/select2.min.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/h-ui/lib/webuploader/0.1.5/webuploader.css}" />
    <script type="text/javascript" th:src="@{/js/lib/jquery-1.11.0.min.js}"></script>
    <script type="text/javascript" th:src="@{/h-ui/lib/layer/2.4/layer.js}"></script>
    <script type="text/javascript" th:src="@{/h-ui/lib/jquery.validation/1.14.0/jquery.validate.js}"></script>
    <script type="text/javascript" th:src="@{/h-ui/lib/jquery.validation/1.14.0/validate-methods.js}"></script>
    <script type="text/javascript" th:src="@{/h-ui/lib/jquery.validation/1.14.0/messages_zh.js}"></script>
    <script type="text/javascript" th:src="@{/h-ui/static/h-ui/js/H-ui.min.js}"></script>
    <script type="text/javascript" th:src="@{/h-ui/static/h-ui.admin/js/H-ui.admin.js}"></script>
    <script type="text/javascript" th:src="@{/h-ui/lib/My97DatePicker/4.8/WdatePicker.js}"></script>
    <script type="text/javascript" th:src="@{/h-ui/lib/webuploader/0.1.5/webuploader.min.js}"></script>
    <script type="text/javascript" th:src="@{/h-ui/lib/laypage/1.3/laypage.js}"></script>
    <script type="text/javascript" th:src="@{/js/common/layerUtil.js}"></script>
    <script type="text/javascript" th:src="@{/js/common/common.js}"></script>
    <script type="text/javascript" th:src="@{/js/common/webUploadUtil.js}"></script>
    <script type="text/javascript" th:src="@{/js/lib/vue.js}"></script>
</head>

<body class="pos-r" layout:fragment="content">
    <div class="pos-a" style="width: 200px; left: 0; top: 0; bottom: 0; height: 100%; border-right: 1px solid #e5e5e5; background-color: #f5f5f5; overflow: auto;">
        <ul id="treeDemo" class="ztree"></ul>
    </div>
    <div style="margin-left: 200px;">
        <nav class="breadcrumb">	
        	<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>广告管理 
        	<span class="c-gray en">&gt;</span> 广告列表 <span class="c-gray en">&gt;</span>1	
        	<span class="c-gray en" th:if="${advertPosition != null}">&gt;</span>
            <th:block th:text="${advertPosition?.name}">1</th:block>
            <a class="btn btn-success radius r" style="line-height: 1.6em; margin-top: 3px" href="javascript:location.replace(location.href);" title="刷新">	
            	<i class="Hui-iconfont">&#xe68f;</i>
            </a>
        </nav>
        <form id="myForm" th:action="@{/admin/advert}" th:method="get">
            <input type="hidden" th:name="advertPositionId" th:value="${advertPosition?.id}" />
            <div class="page-container">
                <div class="text-c">日期范围：
                    <input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'dateMax\')}'})" id="dateMin" class="input-text Wdate" style="width: 120px;" name="startTime" th:value="${startTime}" readonly="readonly" />-
                    <input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'dateMin\')}'})" id="dateMax" class="input-text Wdate" style="width: 120px;" name="endTime" th:value="${endTime}" readonly="readonly" />
                    <input type="text" class="input-text" style="width: 250px" placeholder="输入查询关键字" name="title" th:value="${sarchKkey}" />
                    <button type="submit" class="btn btn-success"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
                </div>
                <div class="cl pd-5 bg-1 bk-gray mt-20">	
                <span class="l"> 
                	<a class="btn btn-primary radius"
						href="javascript:;"
						th:onclick="'javascript:admin_advert_add(\'添加广告\',\'/admin/advert/add?advertPositionId='+${advertPosition?.id}+'\',\'800\',\'500\');'">
							<i class="Hui-iconfont">&#xe600;</i> 添加广告
					</a>
				</span>  
				<span class="r">共有数据：<strong th:text="${pageInfo?.total}">1</strong>
						条
				</span>
                </div>
                <div class="mt-20">
                    <table class="table table-border table-bordered table-bg table-hover table-sort">
                        <thead>
                            <tr class="text-c">
                                <th width="100">标题</th>
                                <th width="100">广告位置</th>
                                <th width="100">链接地址</th>
                                <th width="100">类型</th>
                                <th width="100">展示图片</th>
                                <th width="100">广告内容</th>
                                <th width="100">广告起始时间</th>
                                <th width="100">广告结束时间</th>
                                <th width="100">排序</th>
                                <th width="100">操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr class="text-c va-m" th:each="model:${pageInfo?.records}" th:object="${model}">
                                <td class="text-l" th:text="*{title}"></td>
                                <td class="text-l" th:text="*{name}"></td>
                                <td class="text-l" th:text="*{url}"></td>
                                <td class="text-l" th:text="*{type}"></td>
                                <td class="text-l" th:text="*{picImg}"></td>
                                <td class="text-l" th:text="*{content}"></td>
                                <td class="text-l" th:text="*{#dates.format(beginTime,'yyyy-MM-dd HH:mm:ss')}"></td>
                                <td class="text-l" th:text="*{#dates.format(endTime,'yyyy-MM-dd HH:mm:ss')}"></td>
                                <td class="text-l" th:text="*{sort}"></td>
                                <td class="td-manage">
                                    <a title="编辑" href="javascript:;" onclick="admin_advert_edit('广告编辑','admin-advert-edit.html','1')" th:onclick="'javascript:admin_advert_edit(\'广告编辑\',\'/admin/advert/edit/'+*{id}+'\',\'800\',\'500\');'" style="text-decoration: none">	<i class="Hui-iconfont">&#xe6df;</i>
                                    </a>
                                    <a style="text-decoration: none" class="ml-5" onClick="admin_advert_del(this,'10001')" th:onclick="'javascript:advert_del(this, \'/admin/content/'+*{id}+'\');'" href="javascript:;" title="删除">	<i class="Hui-iconfont">&#xe6e2;</i>
                                    </a>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <div th:replace="admin/common/page :: page"></div>
                </div>
            </div>
        </form>
    </div>
    <script type="text/javascript" th:src="@{/js/common/page.js}"></script>
    <link rel="stylesheet" type="text/css" th:href="@{/h-ui/lib/zTree/v3/css/metroStyle/metroStyle.css}" />
    <script type="text/javascript" th:src="@{/h-ui/lib/zTree/v3/js/jquery.ztree.core-3.5.min.js}"></script>
    <script type="text/javascript" th:src="@{/h-ui/lib/zTree/v3/js/jquery.ztree.excheck-3.5.min.js}"></script>
    <script type="text/javascript" th:src="@{/js/admin/advert/advert-list.js}"></script>
    <script th:inline="javascript">
        $(document).ready(function() {
            inintTree();
        });
    </script>
</body>

</html>